#ifndef TRANSFORMHELPER_H
#define TRANSFORMHELPER_H
#include <QGenericMatrix>
#include <QPoint>
#include <QPointF>
#include <QPolygon>



typedef QGenericMatrix< 1, 3, qreal > QMatrix1x3;



class TransformHelper
{
public:

  static QPointF transform (const QPoint & point, const QMatrix3x3 & mat);

  static QMatrix1x3 toHomogeneousPoint (const QPoint & point);

  static QPoint toNormalPoint (const QMatrix1x3 & point);


    
  static QMatrix3x3 getScaleMatrix (QPointF val);

  static QMatrix3x3 getTranslateMatrix (QPoint v);

  static QMatrix3x3 getRotateMatrix (float angleR);



  static QRect getPolygonBounding (const QPolygon & polygon);

};

#endif // TRANSFORMHELPER_H
